local t = Def.ActorFrame {}
j = 0

--this = LoadActor("")..{}

t[#t+1] = LoadActor("NE02")..{
	InitCommand=cmd(stretchto,0,0,SCREEN_WIDTH,SCREEN_HEIGHT;pause;playcommand,"Frames");
	FramesCommand=function(self)
		self:setstate(j);
		self:sleep(0.05);
		j = j+1
		if j < 18 then
			self:queuecommand("Frames");
		end;
	end;
}

t[#t+1] = LoadActor("PANEL")..{
	InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffuse,1,1,1,0.7);
	OnCommand=cmd(zoomx,0.33;linear,0.4;zoomx,1);
}

for i=0,1 do
	t[#t+1] = LoadActor("VAR")..{
		InitCommand=function(self)
			local turn = i == 0 and -136 or 136
			self:x(SCREEN_CENTER_X);
			self:y(SCREEN_CENTER_Y+turn);
		end;
		OnCommand=cmd(zoomx,0.33;linear,0.4;zoomx,1);
	}
end

t[#t+1] = LoadActor(GAMESTATE:HasEarnedExtraStage() and "FONT2" or "FONT1")..{
	InitCommand=cmd(horizalign,left;zoomx,0;x,SCREEN_CENTER_X-80;y,SCREEN_CENTER_Y);
	OnCommand=function(self)
		(cmd(linear,0.4;zoomx,1))(self);
		self:x(GAMESTATE:HasEarnedExtraStage() and SCREEN_CENTER_X-192 or SCREEN_CENTER_X-160)
	end;
}

local gfn = {"SIDEL","SIDER"}

for i=1,#gfn do
	t[#t+1] = LoadActor(gfn[i])..{
		InitCommand=cmd(y,SCREEN_CENTER_Y);
		OnCommand=function(self)
			local fpl = i == 1 and -1 or 1;
			self:x(SCREEN_CENTER_X+80*fpl);
			self:linear(0.4);
			self:x(SCREEN_CENTER_X+245*fpl);
		end;
	}
end

return t